﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace DeepZoomPivotConstructor.ErrorAndLoggingInterfaces
{
    /// <summary>
    /// Simple interface that everyone (and plug-ins) can use to log
    /// messages to a detailed log file (that the user doesn't normally see!).
    /// MEF can be used to get one of these with the usual declaration:
    /// [Import] IErrorLogger MyLogger {get; set;}
    /// or similar...
    /// This logger must be thread safe and re-entrant!!
    /// </summary>
    public interface IErrorLogger
    {
        /// <summary>
        /// Add a message to the log file.
        /// </summary>
        void LogMessage(string ID, string message);
        void LogMessage(string ID, string message, Exception e);

        /// <summary>
        /// Move the current log file over, and start using it there.
        /// This should not throw an exception of any kind!
        /// </summary>
        /// <param name="newDirectory"></param>
        void SetLogfileLocation(DirectoryInfo newDirectory);
    }
}
